<?php

/*

 My Pets (mypets.php)

*/

$rank_check = 1;
$page_title = "My Pets";
include "header.inc.php";

$getPet = fetch("SELECT id FROM user_pets2 WHERE id = '$pet' AND owner = '$userid' AND game = '$game' AND adoption = '0'");

if ($getPet[id]) { mysql_query("UPDATE members2 SET active_pet = '$getPet[id]' WHERE id = '$userid' AND game = '$game'"); }

header(error("view_pet.php?game=$game&id=$pet", "This is now your active pet!"));

?>